<template>
  <div class="aside">
    <el-menu
      :router="true"
      default-active="3"
      class="el-menu-vertical-demo"
      @open="handleOpen"
      @close="handleClose"
      background-color="#545c64"
      text-color="#fff"
      active-text-color="orange"
    >
      <el-menu-item index="1" class="item">
        <span class="imgBox">
          <img src="../../assets/logo.png" width="60" alt />
        </span>
      </el-menu-item>
      <el-menu-item index="1">
        <template slot="title">
          <span>管理员</span>
        </template>
      </el-menu-item>

      <el-submenu index="3">
        <template slot="title">
          <i class="el-icon-user"></i>
          <span>管理员管理</span>
        </template>
        <el-menu-item-group>
          <el-menu-item index="/system/adminsList">管理员列表</el-menu-item>
          <el-menu-item index="/system/addAdmins">添加管理员</el-menu-item>
        </el-menu-item-group>
      </el-submenu>

      <el-submenu index="4">
        <template slot="title">
          <i class="el-icon-user"></i>
          <span>销售员管理</span>
        </template>
        <el-menu-item-group>
          <el-menu-item index="/system/salesPersonList">销售员列表</el-menu-item>
          <el-menu-item index="/system/addSalesPerson">新增销售员</el-menu-item>
          <el-menu-item index="/system/customer">客户管理</el-menu-item>
        </el-menu-item-group>
      </el-submenu>
      <!-- 保险种类和产品 -->
      <el-submenu index="1-4">
        <template slot="title">
          <i class="el-icon-menu"></i>
          <span>保险类别管理</span>
        </template>
        <el-menu-item index="/system/categorylist">分类展示</el-menu-item>
        <el-menu-item index="/system/addcategory">增加类别</el-menu-item>
        <el-menu-item index="/system/changecategory">修改分类</el-menu-item>
      </el-submenu>
      <el-submenu index="1-3">
         <template slot="title">
              <i class="el-icon-menu"></i>
           <span> 保险产品管理</span>
            </template>
        <el-menu-item index="/system/productlist">产品展示</el-menu-item>
        <el-menu-item index="/system/addproduct">增加产品</el-menu-item>
        <el-menu-item index="/system/changeproduct">修改产品</el-menu-item>
      </el-submenu>
    </el-menu>
  </div>
</template>

<script>
export default {
  methods: {
    handleOpen(key, keyPath) {
      // console.log(key, keyPath);
    },
    handleClose(key, keyPath) {
      // console.log(key, keyPath);
    },
  },
};
</script>

<style scoped>
.aside {
  background-color: #545c64;
  height: 100vh;
}
.el-menu {
  border-right: 0 !important;
}
.imgBox {
  display: inline-block;
  width: 70px;
  height: 70px;
  background-color: #fff;
  border-radius: 50%;
  margin-top: 10px;
}
.imgBox img {
  margin-top: 10px;
}
.item {
  height: 90px;
}
</style>